﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace NotMyBoom
{
    public class MyWindow : VisibleGameEntity
    {
        protected int height;

        public int Height
        {
            get { return height; }
            set { height = value; }
        }
        protected int width;

        public int Width
        {
            get { return width; }
            set { width = value; }
        }

        protected string text;

        public string Text
        {
            get { return text; }
            set { text = value; }
        }

        protected Color color;

        public Color Color
        {
            get { return color; }
            set { color = value; }
        }
       
        protected SpriteFont font;

        public SpriteFont Font
        {
            get { return font; }
            set { font = value; }
        }

        protected Texture2D CreateRect(GraphicsDevice graphicsDevice,int width, int height,Color color)
        {
            Texture2D rect = new Texture2D(graphicsDevice, width, height, 1, TextureUsage.None,
            SurfaceFormat.Color);// create the rectangle texture, ,but it will have no color! lets fix that
            Color[] colors = new Color[width * height];//set the color to the amount of pixels

            for (int i = 0; i < colors.Length; i++)//loop through all the colors setting them to whatever values we want
            {
                colors[i] = color;
            }
            rect.SetData(colors);//set the color data on the texture
            return rect;
        }
    }
}
